package com.persons.springbootproject.entity;

public class Student {
    private Integer id;
    private String name;
    private Integer age;
    private String sex;
    private Integer studentNumber;
    private Integer chineseScore;
    private Integer mathScore;
    private Integer englishScore;

    public Student(Integer id, String name, Integer age, String sex, Integer studentNumber,Integer chineseScore,Integer mathScore,Integer englishScore) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.studentNumber = studentNumber;
        this.chineseScore = chineseScore;
        this.mathScore = mathScore;
        this.englishScore = englishScore;
    }

    public String totalScore(){

        return "Total Score="+(chineseScore+mathScore+englishScore);
    }

    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", student number='" + studentNumber + '\'' +
                '}';
    }
}
